/*
 * Mirror.java
 *
 * Created on April 22, 2007, 12:54 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package info.decamps.m2settings.beans;

import info.decamps.m2settings.model.Mirror;
import java.net.MalformedURLException;
import java.net.URL;

/**
 *
 * @author regis decamps (decamps@users.sf.net)
 */
public class MyMirror  {
    Mirror mirror;
    /** Creates a new instance of Mirror with default values. */
    public MyMirror() {
        this.mirror=new Mirror();
        setMirrorOf("central");
    }
    public MyMirror(info.decamps.m2settings.model.Mirror parent) {
        this.mirror=parent;
    }
    
    public void setUrl(String url) throws MalformedURLException {
        URL u=new URL(url);
        mirror.setUrl(url);
    }

    public void setMirrorOf(String mirrorOf) {
        mirror.setMirrorOf(mirrorOf);
    }

    public void setId(String id) {
        mirror.setId(id);
    }

    public void setName(String name) {
        mirror.setName(name);
    }

    public Mirror getMirror() {
        return mirror;
    }

    public String getId() {
        return mirror.getId();
    }

    public String getMirrorOf() {
        return mirror.getMirrorOf();
    }

    public String getName() {
        return mirror.getName();
    }

    public String getUrl() {
        return mirror.getUrl();
    }


}